<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="layout" content="main" />
        <title>每月产品销售图表</title>
        <gui:resources components="['chart']" mode='debug'/>
    </head>
    <body class='yui-skin-sam'>
        <div class="nav">
            <span class="menuButton"><g:link class="list" controller="importProduct" action="list">库存流水账列表</g:link></span>
        </div>
        <div class="body">
            <h1>每月产品销售图表</h1>

            <div class="search">
                <g:form action="doMonthProductCharts">
                    <g:datePicker name="pickDate" value="${new Date()}" precision="month"/>
                    <input class="save" type="submit" value="搜索" />
                </g:form>
            </div>
            <br>
            <g:if test="${productChartList == null}">
                请选择输入的月份
            </g:if>
            <g:else>
            <div id='barChart' style="width:600px; height: 400px"></div>
            <gui:barChart
                id='myBarChart'
                renderTo="barChart"
                data="${productChartList}"
                seriesDefs="[
                [
                modelNo: 'modelNo'
                ],
                [
                amount: 'amount'
                ]
                ]"
                />
            </g:else>
        </div>

    </body>
</html>
